<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2.6 CSS3画心形和蛋形</title>
    <style>
        #heart{
            width: 100px;
            height: 90px;
            position: relative;
            margin: 100px auto;
            background-color: #FF0;
        }
        #heart::before{
            content: '';
            position: absolute;
            width: 50px;
            height: 80px;
            background-color: red;
            border-radius: 50px 40px 0px 0px;
            transform-origin: 0 100%;
            -webkit-transform-origin: 0 100%;
            -moz-transform-origin: 0 100%;
            -ms-transform-origin: 0 100%;
            -o-transform-origin: 0 100%;
            transform: rotate(-45deg);
             left: 50px;
        }

        #heart::after{
            content: '';
            position: absolute;
            width: 50px;
            height: 80px;
            background-color: red;
            border-radius: 50px 40px 0px 0px;
            transform-origin: 100% 100%;
            transform: rotate(45deg);
            left: 0px;
        }

        /*鸡蛋*/
        #egg{
            width: 126px;
            height: 180px;
            background-color: #FA3;
            margin:100px auto;
            border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
        }
    </style>
</head>
<body>
  <div id="heart"></div>
  <div id="egg"></div>
</body>
</html>